// 宣讲会相关的接口函数
import request from '@/utils/http.js'

//查询宣讲会根据企业绑定的用户id
export const addVideoAPI = (data) => {
    return request({
        url: '/video/addVideo',
        method: 'post',
        data: {
            videoUserId: data.videoUserId,
            videoEnterpriseId: data.videoEnterpriseId,
            videoStartTime: data.videoStartTime,
            videoEndTime: data.videoEndTime,
            videoRemarks:data.videoRemarks,
            videoName: data.videoName,
            videoUrl: data.videoUrl,
            videoText: data.videoText,
            videoStatus: data.videoStatus,
            videoCertificationStatus: data.videoCertificationStatus,
        }
    })
}

//查询宣讲会根据企业绑定的用户id
export const queryVideoByEnterpriseUserIdAIP = (enterpriseUserId) => {
    return request({
        url: '/video/queryVideoByEnterpriseUserId',
        method: 'post',
        params: {enterpriseUserId}
    })
}

//分页查询宣讲会
export const pageVideoAPI = (data) => {
    return request({
        url: '/video/pageVideo',
        method: 'post',
        data: {
            pageCurrent: data.pageCurrent,
            pageSize: data.pageSize,
            searchName: data.searchName,
            videoCertificationStatus: data.videoCertificationStatus,
            videoStatus: data.videoStatus,
        }
    })
}
//更新宣讲会信息
export const updateVideoByIdAPI = (data) => {
    return request({
        url: '/video/updateVideoById',
        method: 'post',
        data: {
            videoStartTime: data.videoStartTime,
            videoEndTime: data.videoEndTime,
            videoRemarks:data.videoRemarks,
            videoId: data.videoId,
            videoName: data.videoName,
            videoUrl: data.videoUrl,
            videoCertificationStatus: data.videoCertificationStatus,
            videoCertificationRefuse:data.videoCertificationRefuse,
            videoStatus: data.videoStatus,
        }
    })
}
//6.更改宣讲会审核状态
export const updateVideoStatusAPI = (videoId, userStatus) => {
    return request({
        url: '/video/updateVideoStatus',
        method: 'post',
        params: {
            videoId: videoId,
            videoAdminStatus: userStatus
        }
    })
}
//7.查询宣讲会详情
export const queryVideoDetailByVideoIdAPI = (videoId) => {
    return request({
        url: '/video/queryVideoDetailByVideoId',
        method: 'post',
        params: {
            videoId: videoId
        }
    })
}
//6.更改宣讲会管理状态
export const updateVideoAdminStatusAPI = (videoId, userStatus) => {
    return request({
        url: '/video/updateVideoAdminStatus',
        method: 'post',
        params: {
            videoId: videoId,
            videoAdminStatus: userStatus
        }
    })
}
